<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>请假信息管理系统 -- 审批学生请假</title>
    <script src="../../../js/jquery.min.js"></script>
    <link href="../../../css/leaveApplyManage/approveLeaveInfo.css" rel="stylesheet">
    <link href="../../../css/common/common.css" rel="stylesheet">
</head>
<body>
<!-- 顶部弹出提示信息容器 -->
<div id="notification" class="notification">
    <span id="message"></span>
</div>
    <!-- 头部 -->
    <header th:insert="~{common/common::header}">
    </header>
    <!-- 左边 -->
    <aside th:insert="~{common/common::aside}">
    </aside>
    <!-- 中间 -->
    <main class="main">
        <form id="depFrom">
            <h2 style="margin: 20px 30%;">审批学生请假单</h2>
            <input th:value="${leave.leaveID}" name="leaveID" style="display: none" >
            <div class="form-group">
                <label>
                    请假单编号：<span th:text="${leave.leaveID}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    课程名称：<span th:text="${leave.courseName}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    课程编号：<span th:text="${leave.courseID}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    学号：<span th:text="${leave.stuID}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    学生姓名：<span th:text="${leave.stuID}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    请假时间：<span th:text="${leave.applyTime}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    天数：<span th:text="${leave.dayNum}"></span>
                </label>
            </div>
            <div class="form-group">
                <label>
                    审批情况：<span th:text="${leave.status == '0' ? '未审核':''}" th:if="${leave.status == '0'}"></span>
                        <span th:text="${leave.status == '1' ? '同意':''}" th:if="${leave.status == '1'}"></span>
                        <span th:text="${leave.status == '2' ? '不同意':''}" th:if="${leave.status == '2'}"></span>
                </label>
            </div>
            <div class="form-group">
                <label style="display: flex;align-content: center">
                    审核意见&nbsp;&nbsp;
                    <span name="opinion" th:text="${leave.opinion}"></span>
                </label>
            </div>
            <input type="button" value="返回" onclick="goBack()">
        </form>

    </main>
</body>

<script th:inline="javascript" type="text/javascript">
    function goBack(){
        window.location.href = '/leaveApply/approveLeaveList?pageNum=1&pageSize=7';
    }

    function showNotification() {
        const notification = document.getElementById("notification");
        notification.classList.add("show");

        setTimeout(function() {
            notification.classList.remove("show");
        }, 2000); // 3秒后自动消失
    }

    function outLogin(){
        location.href = '/outLogin'
    }
</script>

</html>